<template>
  <div class="delete-line" :class="[isLine ? 'line' : '']" :title="$slots.default[0].text">
    <slot />
  </div>
</template>
<script>
export default {
  props: {
    title: {
      type: String,
      default: ''
    },
    isLine: {
      type: Boolean,
      default: false
    }
  }
}
</script>
<style lang="scss" scoped>
.delete-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0px 10px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.line {
  &:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: red;
    transform: translateY(-50%);
  }
}
</style>
